<template>
  <div>
    <div>
      <h3>child-b</h3>
      <el-input v-model="val"></el-input>
      <el-button @click="clickEvent">通知兄弟组件child-a，我们传值过来了</el-button>
    </div>
  </div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import eventBus from '@/utils/eventBus'

let val = ref('')
const clickEvent = () => {
  eventBus.emit('bToA', val.value)
}
</script>
<style lang="scss" scoped></style>
